package com.gaoshu.service.serviceimpl;

import com.gaoshu.bean.Departments;
import com.gaoshu.mapper.DepartmentsMapper;
import com.gaoshu.service.DepartmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class DepartmentsServiceImpl implements DepartmentsService {

    @Autowired
    private DepartmentsMapper departmentsMapper;

    //模糊查询  动态查询
    @Override
    public List<Departments> selectDepartments(String department) {
        return departmentsMapper.selectDepartments(department);
    }

    //新增科室
    @Override
    public int addDepartments(Departments departments) {
        return departmentsMapper.addDepartments(departments);
    }
}
